{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style type=\"text/css\">\n",
       "#T_ff28f_row0_col2, #T_ff28f_row0_col3, #T_ff28f_row0_col4, #T_ff28f_row1_col3, #T_ff28f_row1_col4, #T_ff28f_row2_col2, #T_ff28f_row2_col3, #T_ff28f_row3_col3, #T_ff28f_row4_col2, #T_ff28f_row5_col3, #T_ff28f_row5_col4, #T_ff28f_row6_col3, #T_ff28f_row6_col4, #T_ff28f_row7_col2, #T_ff28f_row7_col4, #T_ff28f_row9_col2, #T_ff28f_row10_col2, #T_ff28f_row11_col2, #T_ff28f_row11_col3, #T_ff28f_row12_col2, #T_ff28f_row13_col3, #T_ff28f_row13_col4, #T_ff28f_row14_col2, #T_ff28f_row15_col3, #T_ff28f_row16_col4, #T_ff28f_row18_col3 {\n",
       "  color: red;\n",
       "}\n",
       "#T_ff28f_row1_col2, #T_ff28f_row2_col4, #T_ff28f_row3_col2, #T_ff28f_row3_col4, #T_ff28f_row4_col3, #T_ff28f_row4_col4, #T_ff28f_row5_col2, #T_ff28f_row6_col2, #T_ff28f_row7_col3, #T_ff28f_row8_col2, #T_ff28f_row8_col3, #T_ff28f_row8_col4, #T_ff28f_row9_col3, #T_ff28f_row9_col4, #T_ff28f_row10_col3, #T_ff28f_row10_col4, #T_ff28f_row11_col4, #T_ff28f_row12_col3, #T_ff28f_row12_col4, #T_ff28f_row13_col2, #T_ff28f_row14_col3, #T_ff28f_row14_col4, #T_ff28f_row15_col2, #T_ff28f_row15_col4, #T_ff28f_row16_col2, #T_ff28f_row16_col3, #T_ff28f_row17_col2, #T_ff28f_row17_col3, #T_ff28f_row17_col4, #T_ff28f_row18_col2, #T_ff28f_row18_col4, #T_ff28f_row19_col2, #T_ff28f_row19_col3, #T_ff28f_row19_col4 {\n",
       "  color: green;\n",
       "}\n",
       "</style>\n",
       "<table id=\"T_ff28f\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th class=\"blank level0\" >&nbsp;</th>\n",
       "      <th id=\"T_ff28f_level0_col0\" class=\"col_heading level0 col0\" >ID</th>\n",
       "      <th id=\"T_ff28f_level0_col1\" class=\"col_heading level0 col1\" >Name</th>\n",
       "      <th id=\"T_ff28f_level0_col2\" class=\"col_heading level0 col2\" >Test_1</th>\n",
       "      <th id=\"T_ff28f_level0_col3\" class=\"col_heading level0 col3\" >Test_2</th>\n",
       "      <th id=\"T_ff28f_level0_col4\" class=\"col_heading level0 col4\" >Test_3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "      <td id=\"T_ff28f_row0_col0\" class=\"data row0 col0\" >1</td>\n",
       "      <td id=\"T_ff28f_row0_col1\" class=\"data row0 col1\" >Student_001</td>\n",
       "      <td id=\"T_ff28f_row0_col2\" class=\"data row0 col2\" >41</td>\n",
       "      <td id=\"T_ff28f_row0_col3\" class=\"data row0 col3\" >31</td>\n",
       "      <td id=\"T_ff28f_row0_col4\" class=\"data row0 col4\" >54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "      <td id=\"T_ff28f_row1_col0\" class=\"data row1 col0\" >2</td>\n",
       "      <td id=\"T_ff28f_row1_col1\" class=\"data row1 col1\" >Student_002</td>\n",
       "      <td id=\"T_ff28f_row1_col2\" class=\"data row1 col2\" >86</td>\n",
       "      <td id=\"T_ff28f_row1_col3\" class=\"data row1 col3\" >22</td>\n",
       "      <td id=\"T_ff28f_row1_col4\" class=\"data row1 col4\" >59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "      <td id=\"T_ff28f_row2_col0\" class=\"data row2 col0\" >3</td>\n",
       "      <td id=\"T_ff28f_row2_col1\" class=\"data row2 col1\" >Student_003</td>\n",
       "      <td id=\"T_ff28f_row2_col2\" class=\"data row2 col2\" >54</td>\n",
       "      <td id=\"T_ff28f_row2_col3\" class=\"data row2 col3\" >25</td>\n",
       "      <td id=\"T_ff28f_row2_col4\" class=\"data row2 col4\" >68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "      <td id=\"T_ff28f_row3_col0\" class=\"data row3 col0\" >4</td>\n",
       "      <td id=\"T_ff28f_row3_col1\" class=\"data row3 col1\" >Student_004</td>\n",
       "      <td id=\"T_ff28f_row3_col2\" class=\"data row3 col2\" >82</td>\n",
       "      <td id=\"T_ff28f_row3_col3\" class=\"data row3 col3\" >36</td>\n",
       "      <td id=\"T_ff28f_row3_col4\" class=\"data row3 col4\" >92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "      <td id=\"T_ff28f_row4_col0\" class=\"data row4 col0\" >5</td>\n",
       "      <td id=\"T_ff28f_row4_col1\" class=\"data row4 col1\" >Student_005</td>\n",
       "      <td id=\"T_ff28f_row4_col2\" class=\"data row4 col2\" >55</td>\n",
       "      <td id=\"T_ff28f_row4_col3\" class=\"data row4 col3\" >99</td>\n",
       "      <td id=\"T_ff28f_row4_col4\" class=\"data row4 col4\" >93</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "      <td id=\"T_ff28f_row5_col0\" class=\"data row5 col0\" >6</td>\n",
       "      <td id=\"T_ff28f_row5_col1\" class=\"data row5 col1\" >Student_006</td>\n",
       "      <td id=\"T_ff28f_row5_col2\" class=\"data row5 col2\" >86</td>\n",
       "      <td id=\"T_ff28f_row5_col3\" class=\"data row5 col3\" >12</td>\n",
       "      <td id=\"T_ff28f_row5_col4\" class=\"data row5 col4\" >50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "      <td id=\"T_ff28f_row6_col0\" class=\"data row6 col0\" >7</td>\n",
       "      <td id=\"T_ff28f_row6_col1\" class=\"data row6 col1\" >Student_007</td>\n",
       "      <td id=\"T_ff28f_row6_col2\" class=\"data row6 col2\" >91</td>\n",
       "      <td id=\"T_ff28f_row6_col3\" class=\"data row6 col3\" >11</td>\n",
       "      <td id=\"T_ff28f_row6_col4\" class=\"data row6 col4\" >54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "      <td id=\"T_ff28f_row7_col0\" class=\"data row7 col0\" >8</td>\n",
       "      <td id=\"T_ff28f_row7_col1\" class=\"data row7 col1\" >Student_008</td>\n",
       "      <td id=\"T_ff28f_row7_col2\" class=\"data row7 col2\" >20</td>\n",
       "      <td id=\"T_ff28f_row7_col3\" class=\"data row7 col3\" >98</td>\n",
       "      <td id=\"T_ff28f_row7_col4\" class=\"data row7 col4\" >52</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "      <td id=\"T_ff28f_row8_col0\" class=\"data row8 col0\" >9</td>\n",
       "      <td id=\"T_ff28f_row8_col1\" class=\"data row8 col1\" >Student_009</td>\n",
       "      <td id=\"T_ff28f_row8_col2\" class=\"data row8 col2\" >74</td>\n",
       "      <td id=\"T_ff28f_row8_col3\" class=\"data row8 col3\" >85</td>\n",
       "      <td id=\"T_ff28f_row8_col4\" class=\"data row8 col4\" >63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "      <td id=\"T_ff28f_row9_col0\" class=\"data row9 col0\" >10</td>\n",
       "      <td id=\"T_ff28f_row9_col1\" class=\"data row9 col1\" >Student_010</td>\n",
       "      <td id=\"T_ff28f_row9_col2\" class=\"data row9 col2\" >28</td>\n",
       "      <td id=\"T_ff28f_row9_col3\" class=\"data row9 col3\" >98</td>\n",
       "      <td id=\"T_ff28f_row9_col4\" class=\"data row9 col4\" >99</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row10\" class=\"row_heading level0 row10\" >10</th>\n",
       "      <td id=\"T_ff28f_row10_col0\" class=\"data row10 col0\" >11</td>\n",
       "      <td id=\"T_ff28f_row10_col1\" class=\"data row10 col1\" >Student_011</td>\n",
       "      <td id=\"T_ff28f_row10_col2\" class=\"data row10 col2\" >35</td>\n",
       "      <td id=\"T_ff28f_row10_col3\" class=\"data row10 col3\" >83</td>\n",
       "      <td id=\"T_ff28f_row10_col4\" class=\"data row10 col4\" >85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row11\" class=\"row_heading level0 row11\" >11</th>\n",
       "      <td id=\"T_ff28f_row11_col0\" class=\"data row11 col0\" >12</td>\n",
       "      <td id=\"T_ff28f_row11_col1\" class=\"data row11 col1\" >Student_012</td>\n",
       "      <td id=\"T_ff28f_row11_col2\" class=\"data row11 col2\" >23</td>\n",
       "      <td id=\"T_ff28f_row11_col3\" class=\"data row11 col3\" >48</td>\n",
       "      <td id=\"T_ff28f_row11_col4\" class=\"data row11 col4\" >67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row12\" class=\"row_heading level0 row12\" >12</th>\n",
       "      <td id=\"T_ff28f_row12_col0\" class=\"data row12 col0\" >13</td>\n",
       "      <td id=\"T_ff28f_row12_col1\" class=\"data row12 col1\" >Student_013</td>\n",
       "      <td id=\"T_ff28f_row12_col2\" class=\"data row12 col2\" >45</td>\n",
       "      <td id=\"T_ff28f_row12_col3\" class=\"data row12 col3\" >62</td>\n",
       "      <td id=\"T_ff28f_row12_col4\" class=\"data row12 col4\" >90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row13\" class=\"row_heading level0 row13\" >13</th>\n",
       "      <td id=\"T_ff28f_row13_col0\" class=\"data row13 col0\" >14</td>\n",
       "      <td id=\"T_ff28f_row13_col1\" class=\"data row13 col1\" >Student_014</td>\n",
       "      <td id=\"T_ff28f_row13_col2\" class=\"data row13 col2\" >63</td>\n",
       "      <td id=\"T_ff28f_row13_col3\" class=\"data row13 col3\" >26</td>\n",
       "      <td id=\"T_ff28f_row13_col4\" class=\"data row13 col4\" >56</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row14\" class=\"row_heading level0 row14\" >14</th>\n",
       "      <td id=\"T_ff28f_row14_col0\" class=\"data row14 col0\" >15</td>\n",
       "      <td id=\"T_ff28f_row14_col1\" class=\"data row14 col1\" >Student_015</td>\n",
       "      <td id=\"T_ff28f_row14_col2\" class=\"data row14 col2\" >50</td>\n",
       "      <td id=\"T_ff28f_row14_col3\" class=\"data row14 col3\" >64</td>\n",
       "      <td id=\"T_ff28f_row14_col4\" class=\"data row14 col4\" >70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row15\" class=\"row_heading level0 row15\" >15</th>\n",
       "      <td id=\"T_ff28f_row15_col0\" class=\"data row15 col0\" >16</td>\n",
       "      <td id=\"T_ff28f_row15_col1\" class=\"data row15 col1\" >Student_016</td>\n",
       "      <td id=\"T_ff28f_row15_col2\" class=\"data row15 col2\" >69</td>\n",
       "      <td id=\"T_ff28f_row15_col3\" class=\"data row15 col3\" >31</td>\n",
       "      <td id=\"T_ff28f_row15_col4\" class=\"data row15 col4\" >96</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row16\" class=\"row_heading level0 row16\" >16</th>\n",
       "      <td id=\"T_ff28f_row16_col0\" class=\"data row16 col0\" >17</td>\n",
       "      <td id=\"T_ff28f_row16_col1\" class=\"data row16 col1\" >Student_017</td>\n",
       "      <td id=\"T_ff28f_row16_col2\" class=\"data row16 col2\" >98</td>\n",
       "      <td id=\"T_ff28f_row16_col3\" class=\"data row16 col3\" >78</td>\n",
       "      <td id=\"T_ff28f_row16_col4\" class=\"data row16 col4\" >55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row17\" class=\"row_heading level0 row17\" >17</th>\n",
       "      <td id=\"T_ff28f_row17_col0\" class=\"data row17 col0\" >18</td>\n",
       "      <td id=\"T_ff28f_row17_col1\" class=\"data row17 col1\" >Student_018</td>\n",
       "      <td id=\"T_ff28f_row17_col2\" class=\"data row17 col2\" >65</td>\n",
       "      <td id=\"T_ff28f_row17_col3\" class=\"data row17 col3\" >74</td>\n",
       "      <td id=\"T_ff28f_row17_col4\" class=\"data row17 col4\" >95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row18\" class=\"row_heading level0 row18\" >18</th>\n",
       "      <td id=\"T_ff28f_row18_col0\" class=\"data row18 col0\" >19</td>\n",
       "      <td id=\"T_ff28f_row18_col1\" class=\"data row18 col1\" >Student_019</td>\n",
       "      <td id=\"T_ff28f_row18_col2\" class=\"data row18 col2\" >95</td>\n",
       "      <td id=\"T_ff28f_row18_col3\" class=\"data row18 col3\" >51</td>\n",
       "      <td id=\"T_ff28f_row18_col4\" class=\"data row18 col4\" >61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_ff28f_level0_row19\" class=\"row_heading level0 row19\" >19</th>\n",
       "      <td id=\"T_ff28f_row19_col0\" class=\"data row19 col0\" >20</td>\n",
       "      <td id=\"T_ff28f_row19_col1\" class=\"data row19 col1\" >Student_020</td>\n",
       "      <td id=\"T_ff28f_row19_col2\" class=\"data row19 col2\" >83</td>\n",
       "      <td id=\"T_ff28f_row19_col3\" class=\"data row19 col3\" >72</td>\n",
       "      <td id=\"T_ff28f_row19_col4\" class=\"data row19 col4\" >82</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x217044d2100>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "#定义一个低分提醒的方法\n",
    "def low_score_red(s):\n",
    "    color = 'red' if s<60 else 'green'\n",
    "    return f'color:{color}'\n",
    "\n",
    "students = pd.read_excel('D:/VSCode/py/office/doc/Students_color.xlsx')\n",
    "#applymap 是选定区域\n",
    "students.style.applymap(low_score_red, subset=['Test_1', 'Test_2', 'Test_3'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style type=\"text/css\">\n",
       "#T_9148a_row0_col2, #T_9148a_row0_col3, #T_9148a_row0_col4, #T_9148a_row1_col2, #T_9148a_row1_col3, #T_9148a_row1_col4, #T_9148a_row2_col2, #T_9148a_row2_col3, #T_9148a_row2_col4, #T_9148a_row3_col2, #T_9148a_row3_col3, #T_9148a_row3_col4, #T_9148a_row4_col2, #T_9148a_row4_col4, #T_9148a_row5_col2, #T_9148a_row5_col3, #T_9148a_row5_col4, #T_9148a_row6_col2, #T_9148a_row6_col3, #T_9148a_row6_col4, #T_9148a_row7_col2, #T_9148a_row7_col3, #T_9148a_row7_col4, #T_9148a_row8_col2, #T_9148a_row8_col3, #T_9148a_row8_col4, #T_9148a_row9_col2, #T_9148a_row9_col3, #T_9148a_row10_col2, #T_9148a_row10_col3, #T_9148a_row10_col4, #T_9148a_row11_col2, #T_9148a_row11_col3, #T_9148a_row11_col4, #T_9148a_row12_col2, #T_9148a_row12_col3, #T_9148a_row12_col4, #T_9148a_row13_col2, #T_9148a_row13_col3, #T_9148a_row13_col4, #T_9148a_row14_col2, #T_9148a_row14_col3, #T_9148a_row14_col4, #T_9148a_row15_col2, #T_9148a_row15_col3, #T_9148a_row15_col4, #T_9148a_row16_col3, #T_9148a_row16_col4, #T_9148a_row17_col2, #T_9148a_row17_col3, #T_9148a_row17_col4, #T_9148a_row18_col2, #T_9148a_row18_col3, #T_9148a_row18_col4, #T_9148a_row19_col2, #T_9148a_row19_col3, #T_9148a_row19_col4 {\n",
       "  background-color: black;\n",
       "}\n",
       "#T_9148a_row4_col3, #T_9148a_row9_col4, #T_9148a_row16_col2 {\n",
       "  background-color: lime;\n",
       "}\n",
       "</style>\n",
       "<table id=\"T_9148a\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th class=\"blank level0\" >&nbsp;</th>\n",
       "      <th id=\"T_9148a_level0_col0\" class=\"col_heading level0 col0\" >ID</th>\n",
       "      <th id=\"T_9148a_level0_col1\" class=\"col_heading level0 col1\" >Name</th>\n",
       "      <th id=\"T_9148a_level0_col2\" class=\"col_heading level0 col2\" >Test_1</th>\n",
       "      <th id=\"T_9148a_level0_col3\" class=\"col_heading level0 col3\" >Test_2</th>\n",
       "      <th id=\"T_9148a_level0_col4\" class=\"col_heading level0 col4\" >Test_3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "      <td id=\"T_9148a_row0_col0\" class=\"data row0 col0\" >1</td>\n",
       "      <td id=\"T_9148a_row0_col1\" class=\"data row0 col1\" >Student_001</td>\n",
       "      <td id=\"T_9148a_row0_col2\" class=\"data row0 col2\" >41</td>\n",
       "      <td id=\"T_9148a_row0_col3\" class=\"data row0 col3\" >31</td>\n",
       "      <td id=\"T_9148a_row0_col4\" class=\"data row0 col4\" >54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "      <td id=\"T_9148a_row1_col0\" class=\"data row1 col0\" >2</td>\n",
       "      <td id=\"T_9148a_row1_col1\" class=\"data row1 col1\" >Student_002</td>\n",
       "      <td id=\"T_9148a_row1_col2\" class=\"data row1 col2\" >86</td>\n",
       "      <td id=\"T_9148a_row1_col3\" class=\"data row1 col3\" >22</td>\n",
       "      <td id=\"T_9148a_row1_col4\" class=\"data row1 col4\" >59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "      <td id=\"T_9148a_row2_col0\" class=\"data row2 col0\" >3</td>\n",
       "      <td id=\"T_9148a_row2_col1\" class=\"data row2 col1\" >Student_003</td>\n",
       "      <td id=\"T_9148a_row2_col2\" class=\"data row2 col2\" >54</td>\n",
       "      <td id=\"T_9148a_row2_col3\" class=\"data row2 col3\" >25</td>\n",
       "      <td id=\"T_9148a_row2_col4\" class=\"data row2 col4\" >68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "      <td id=\"T_9148a_row3_col0\" class=\"data row3 col0\" >4</td>\n",
       "      <td id=\"T_9148a_row3_col1\" class=\"data row3 col1\" >Student_004</td>\n",
       "      <td id=\"T_9148a_row3_col2\" class=\"data row3 col2\" >82</td>\n",
       "      <td id=\"T_9148a_row3_col3\" class=\"data row3 col3\" >36</td>\n",
       "      <td id=\"T_9148a_row3_col4\" class=\"data row3 col4\" >92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "      <td id=\"T_9148a_row4_col0\" class=\"data row4 col0\" >5</td>\n",
       "      <td id=\"T_9148a_row4_col1\" class=\"data row4 col1\" >Student_005</td>\n",
       "      <td id=\"T_9148a_row4_col2\" class=\"data row4 col2\" >55</td>\n",
       "      <td id=\"T_9148a_row4_col3\" class=\"data row4 col3\" >99</td>\n",
       "      <td id=\"T_9148a_row4_col4\" class=\"data row4 col4\" >93</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "      <td id=\"T_9148a_row5_col0\" class=\"data row5 col0\" >6</td>\n",
       "      <td id=\"T_9148a_row5_col1\" class=\"data row5 col1\" >Student_006</td>\n",
       "      <td id=\"T_9148a_row5_col2\" class=\"data row5 col2\" >86</td>\n",
       "      <td id=\"T_9148a_row5_col3\" class=\"data row5 col3\" >12</td>\n",
       "      <td id=\"T_9148a_row5_col4\" class=\"data row5 col4\" >50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "      <td id=\"T_9148a_row6_col0\" class=\"data row6 col0\" >7</td>\n",
       "      <td id=\"T_9148a_row6_col1\" class=\"data row6 col1\" >Student_007</td>\n",
       "      <td id=\"T_9148a_row6_col2\" class=\"data row6 col2\" >91</td>\n",
       "      <td id=\"T_9148a_row6_col3\" class=\"data row6 col3\" >11</td>\n",
       "      <td id=\"T_9148a_row6_col4\" class=\"data row6 col4\" >54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "      <td id=\"T_9148a_row7_col0\" class=\"data row7 col0\" >8</td>\n",
       "      <td id=\"T_9148a_row7_col1\" class=\"data row7 col1\" >Student_008</td>\n",
       "      <td id=\"T_9148a_row7_col2\" class=\"data row7 col2\" >20</td>\n",
       "      <td id=\"T_9148a_row7_col3\" class=\"data row7 col3\" >98</td>\n",
       "      <td id=\"T_9148a_row7_col4\" class=\"data row7 col4\" >52</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "      <td id=\"T_9148a_row8_col0\" class=\"data row8 col0\" >9</td>\n",
       "      <td id=\"T_9148a_row8_col1\" class=\"data row8 col1\" >Student_009</td>\n",
       "      <td id=\"T_9148a_row8_col2\" class=\"data row8 col2\" >74</td>\n",
       "      <td id=\"T_9148a_row8_col3\" class=\"data row8 col3\" >85</td>\n",
       "      <td id=\"T_9148a_row8_col4\" class=\"data row8 col4\" >63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "      <td id=\"T_9148a_row9_col0\" class=\"data row9 col0\" >10</td>\n",
       "      <td id=\"T_9148a_row9_col1\" class=\"data row9 col1\" >Student_010</td>\n",
       "      <td id=\"T_9148a_row9_col2\" class=\"data row9 col2\" >28</td>\n",
       "      <td id=\"T_9148a_row9_col3\" class=\"data row9 col3\" >98</td>\n",
       "      <td id=\"T_9148a_row9_col4\" class=\"data row9 col4\" >99</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row10\" class=\"row_heading level0 row10\" >10</th>\n",
       "      <td id=\"T_9148a_row10_col0\" class=\"data row10 col0\" >11</td>\n",
       "      <td id=\"T_9148a_row10_col1\" class=\"data row10 col1\" >Student_011</td>\n",
       "      <td id=\"T_9148a_row10_col2\" class=\"data row10 col2\" >35</td>\n",
       "      <td id=\"T_9148a_row10_col3\" class=\"data row10 col3\" >83</td>\n",
       "      <td id=\"T_9148a_row10_col4\" class=\"data row10 col4\" >85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row11\" class=\"row_heading level0 row11\" >11</th>\n",
       "      <td id=\"T_9148a_row11_col0\" class=\"data row11 col0\" >12</td>\n",
       "      <td id=\"T_9148a_row11_col1\" class=\"data row11 col1\" >Student_012</td>\n",
       "      <td id=\"T_9148a_row11_col2\" class=\"data row11 col2\" >23</td>\n",
       "      <td id=\"T_9148a_row11_col3\" class=\"data row11 col3\" >48</td>\n",
       "      <td id=\"T_9148a_row11_col4\" class=\"data row11 col4\" >67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row12\" class=\"row_heading level0 row12\" >12</th>\n",
       "      <td id=\"T_9148a_row12_col0\" class=\"data row12 col0\" >13</td>\n",
       "      <td id=\"T_9148a_row12_col1\" class=\"data row12 col1\" >Student_013</td>\n",
       "      <td id=\"T_9148a_row12_col2\" class=\"data row12 col2\" >45</td>\n",
       "      <td id=\"T_9148a_row12_col3\" class=\"data row12 col3\" >62</td>\n",
       "      <td id=\"T_9148a_row12_col4\" class=\"data row12 col4\" >90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row13\" class=\"row_heading level0 row13\" >13</th>\n",
       "      <td id=\"T_9148a_row13_col0\" class=\"data row13 col0\" >14</td>\n",
       "      <td id=\"T_9148a_row13_col1\" class=\"data row13 col1\" >Student_014</td>\n",
       "      <td id=\"T_9148a_row13_col2\" class=\"data row13 col2\" >63</td>\n",
       "      <td id=\"T_9148a_row13_col3\" class=\"data row13 col3\" >26</td>\n",
       "      <td id=\"T_9148a_row13_col4\" class=\"data row13 col4\" >56</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row14\" class=\"row_heading level0 row14\" >14</th>\n",
       "      <td id=\"T_9148a_row14_col0\" class=\"data row14 col0\" >15</td>\n",
       "      <td id=\"T_9148a_row14_col1\" class=\"data row14 col1\" >Student_015</td>\n",
       "      <td id=\"T_9148a_row14_col2\" class=\"data row14 col2\" >50</td>\n",
       "      <td id=\"T_9148a_row14_col3\" class=\"data row14 col3\" >64</td>\n",
       "      <td id=\"T_9148a_row14_col4\" class=\"data row14 col4\" >70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row15\" class=\"row_heading level0 row15\" >15</th>\n",
       "      <td id=\"T_9148a_row15_col0\" class=\"data row15 col0\" >16</td>\n",
       "      <td id=\"T_9148a_row15_col1\" class=\"data row15 col1\" >Student_016</td>\n",
       "      <td id=\"T_9148a_row15_col2\" class=\"data row15 col2\" >69</td>\n",
       "      <td id=\"T_9148a_row15_col3\" class=\"data row15 col3\" >31</td>\n",
       "      <td id=\"T_9148a_row15_col4\" class=\"data row15 col4\" >96</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row16\" class=\"row_heading level0 row16\" >16</th>\n",
       "      <td id=\"T_9148a_row16_col0\" class=\"data row16 col0\" >17</td>\n",
       "      <td id=\"T_9148a_row16_col1\" class=\"data row16 col1\" >Student_017</td>\n",
       "      <td id=\"T_9148a_row16_col2\" class=\"data row16 col2\" >98</td>\n",
       "      <td id=\"T_9148a_row16_col3\" class=\"data row16 col3\" >78</td>\n",
       "      <td id=\"T_9148a_row16_col4\" class=\"data row16 col4\" >55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row17\" class=\"row_heading level0 row17\" >17</th>\n",
       "      <td id=\"T_9148a_row17_col0\" class=\"data row17 col0\" >18</td>\n",
       "      <td id=\"T_9148a_row17_col1\" class=\"data row17 col1\" >Student_018</td>\n",
       "      <td id=\"T_9148a_row17_col2\" class=\"data row17 col2\" >65</td>\n",
       "      <td id=\"T_9148a_row17_col3\" class=\"data row17 col3\" >74</td>\n",
       "      <td id=\"T_9148a_row17_col4\" class=\"data row17 col4\" >95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row18\" class=\"row_heading level0 row18\" >18</th>\n",
       "      <td id=\"T_9148a_row18_col0\" class=\"data row18 col0\" >19</td>\n",
       "      <td id=\"T_9148a_row18_col1\" class=\"data row18 col1\" >Student_019</td>\n",
       "      <td id=\"T_9148a_row18_col2\" class=\"data row18 col2\" >95</td>\n",
       "      <td id=\"T_9148a_row18_col3\" class=\"data row18 col3\" >51</td>\n",
       "      <td id=\"T_9148a_row18_col4\" class=\"data row18 col4\" >61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_9148a_level0_row19\" class=\"row_heading level0 row19\" >19</th>\n",
       "      <td id=\"T_9148a_row19_col0\" class=\"data row19 col0\" >20</td>\n",
       "      <td id=\"T_9148a_row19_col1\" class=\"data row19 col1\" >Student_020</td>\n",
       "      <td id=\"T_9148a_row19_col2\" class=\"data row19 col2\" >83</td>\n",
       "      <td id=\"T_9148a_row19_col3\" class=\"data row19 col3\" >72</td>\n",
       "      <td id=\"T_9148a_row19_col4\" class=\"data row19 col4\" >82</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x22bf65b3d30>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "#定义每列中最高分用绿字表示\n",
    "def highest_score_green2(col):\n",
    "    return ['background-color:lime' if v==col.max() else 'background-color:black' for v in col]\n",
    "\n",
    "students = pd.read_excel('D:/VSCode/py/office/doc/Students_color.xlsx')\n",
    "#apply 是选定列，注意跟applymap的区别\n",
    "students.style.apply(highest_score_green2, subset=['Test_1', 'Test_2', 'Test_3'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style type=\"text/css\">\n",
       "#T_8f6e5_row0_col2 {\n",
       "  background-color: #acd4ac;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row0_col3, #T_8f6e5_row15_col3 {\n",
       "  background-color: #b5d9b5;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row0_col4, #T_8f6e5_row6_col4 {\n",
       "  background-color: #d8ead8;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row1_col2, #T_8f6e5_row5_col2 {\n",
       "  background-color: #249224;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row1_col3 {\n",
       "  background-color: #cde5cd;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row1_col4 {\n",
       "  background-color: #bfdebf;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row2_col2 {\n",
       "  background-color: #84c184;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row2_col3 {\n",
       "  background-color: #c6e1c6;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row2_col4 {\n",
       "  background-color: #94c994;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row3_col2 {\n",
       "  background-color: #309730;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row3_col3 {\n",
       "  background-color: #a8d2a8;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row3_col4 {\n",
       "  background-color: #219021;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row4_col2 {\n",
       "  background-color: #82c082;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row4_col3, #T_8f6e5_row9_col4, #T_8f6e5_row16_col2 {\n",
       "  background-color: #008000;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row4_col4 {\n",
       "  background-color: #1d8e1d;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row5_col3 {\n",
       "  background-color: #e9f2e9;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row5_col4, #T_8f6e5_row6_col3, #T_8f6e5_row7_col2 {\n",
       "  background-color: #ebf3eb;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row6_col2 {\n",
       "  background-color: #148a14;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row7_col3, #T_8f6e5_row9_col3 {\n",
       "  background-color: #028102;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row7_col4 {\n",
       "  background-color: #e1eee1;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row8_col2, #T_8f6e5_row19_col3 {\n",
       "  background-color: #48a348;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row8_col3 {\n",
       "  background-color: #259225;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row8_col4 {\n",
       "  background-color: #add5ad;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row9_col2, #T_8f6e5_row16_col4 {\n",
       "  background-color: #d3e7d3;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row10_col2 {\n",
       "  background-color: #bdddbd;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row10_col3 {\n",
       "  background-color: #2a952a;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row10_col4 {\n",
       "  background-color: #43a143;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row11_col2 {\n",
       "  background-color: #e2efe2;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row11_col3 {\n",
       "  background-color: #88c388;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row11_col4 {\n",
       "  background-color: #9acb9a;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row12_col2 {\n",
       "  background-color: #9fce9f;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row12_col3 {\n",
       "  background-color: #62b062;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row12_col4 {\n",
       "  background-color: #2b952b;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row13_col2 {\n",
       "  background-color: #69b369;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row13_col3 {\n",
       "  background-color: #c3e0c3;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row13_col4 {\n",
       "  background-color: #cee5ce;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row14_col2 {\n",
       "  background-color: #90c790;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row14_col3 {\n",
       "  background-color: #5dae5d;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row14_col4 {\n",
       "  background-color: #8bc48b;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row15_col2 {\n",
       "  background-color: #57ab57;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row15_col4 {\n",
       "  background-color: #0e870e;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row16_col3 {\n",
       "  background-color: #389b38;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row17_col2 {\n",
       "  background-color: #63b163;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row17_col3 {\n",
       "  background-color: #42a042;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row17_col4 {\n",
       "  background-color: #128912;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row18_col2 {\n",
       "  background-color: #088408;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row18_col3 {\n",
       "  background-color: #80bf80;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row18_col4 {\n",
       "  background-color: #b6d9b6;\n",
       "  color: #000000;\n",
       "}\n",
       "#T_8f6e5_row19_col2 {\n",
       "  background-color: #2d962d;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "#T_8f6e5_row19_col4 {\n",
       "  background-color: #51a851;\n",
       "  color: #f1f1f1;\n",
       "}\n",
       "</style>\n",
       "<table id=\"T_8f6e5\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th class=\"blank level0\" >&nbsp;</th>\n",
       "      <th id=\"T_8f6e5_level0_col0\" class=\"col_heading level0 col0\" >ID</th>\n",
       "      <th id=\"T_8f6e5_level0_col1\" class=\"col_heading level0 col1\" >Name</th>\n",
       "      <th id=\"T_8f6e5_level0_col2\" class=\"col_heading level0 col2\" >Test_1</th>\n",
       "      <th id=\"T_8f6e5_level0_col3\" class=\"col_heading level0 col3\" >Test_2</th>\n",
       "      <th id=\"T_8f6e5_level0_col4\" class=\"col_heading level0 col4\" >Test_3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "      <td id=\"T_8f6e5_row0_col0\" class=\"data row0 col0\" >1</td>\n",
       "      <td id=\"T_8f6e5_row0_col1\" class=\"data row0 col1\" >Student_001</td>\n",
       "      <td id=\"T_8f6e5_row0_col2\" class=\"data row0 col2\" >41</td>\n",
       "      <td id=\"T_8f6e5_row0_col3\" class=\"data row0 col3\" >31</td>\n",
       "      <td id=\"T_8f6e5_row0_col4\" class=\"data row0 col4\" >54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "      <td id=\"T_8f6e5_row1_col0\" class=\"data row1 col0\" >2</td>\n",
       "      <td id=\"T_8f6e5_row1_col1\" class=\"data row1 col1\" >Student_002</td>\n",
       "      <td id=\"T_8f6e5_row1_col2\" class=\"data row1 col2\" >86</td>\n",
       "      <td id=\"T_8f6e5_row1_col3\" class=\"data row1 col3\" >22</td>\n",
       "      <td id=\"T_8f6e5_row1_col4\" class=\"data row1 col4\" >59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "      <td id=\"T_8f6e5_row2_col0\" class=\"data row2 col0\" >3</td>\n",
       "      <td id=\"T_8f6e5_row2_col1\" class=\"data row2 col1\" >Student_003</td>\n",
       "      <td id=\"T_8f6e5_row2_col2\" class=\"data row2 col2\" >54</td>\n",
       "      <td id=\"T_8f6e5_row2_col3\" class=\"data row2 col3\" >25</td>\n",
       "      <td id=\"T_8f6e5_row2_col4\" class=\"data row2 col4\" >68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "      <td id=\"T_8f6e5_row3_col0\" class=\"data row3 col0\" >4</td>\n",
       "      <td id=\"T_8f6e5_row3_col1\" class=\"data row3 col1\" >Student_004</td>\n",
       "      <td id=\"T_8f6e5_row3_col2\" class=\"data row3 col2\" >82</td>\n",
       "      <td id=\"T_8f6e5_row3_col3\" class=\"data row3 col3\" >36</td>\n",
       "      <td id=\"T_8f6e5_row3_col4\" class=\"data row3 col4\" >92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "      <td id=\"T_8f6e5_row4_col0\" class=\"data row4 col0\" >5</td>\n",
       "      <td id=\"T_8f6e5_row4_col1\" class=\"data row4 col1\" >Student_005</td>\n",
       "      <td id=\"T_8f6e5_row4_col2\" class=\"data row4 col2\" >55</td>\n",
       "      <td id=\"T_8f6e5_row4_col3\" class=\"data row4 col3\" >99</td>\n",
       "      <td id=\"T_8f6e5_row4_col4\" class=\"data row4 col4\" >93</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "      <td id=\"T_8f6e5_row5_col0\" class=\"data row5 col0\" >6</td>\n",
       "      <td id=\"T_8f6e5_row5_col1\" class=\"data row5 col1\" >Student_006</td>\n",
       "      <td id=\"T_8f6e5_row5_col2\" class=\"data row5 col2\" >86</td>\n",
       "      <td id=\"T_8f6e5_row5_col3\" class=\"data row5 col3\" >12</td>\n",
       "      <td id=\"T_8f6e5_row5_col4\" class=\"data row5 col4\" >50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "      <td id=\"T_8f6e5_row6_col0\" class=\"data row6 col0\" >7</td>\n",
       "      <td id=\"T_8f6e5_row6_col1\" class=\"data row6 col1\" >Student_007</td>\n",
       "      <td id=\"T_8f6e5_row6_col2\" class=\"data row6 col2\" >91</td>\n",
       "      <td id=\"T_8f6e5_row6_col3\" class=\"data row6 col3\" >11</td>\n",
       "      <td id=\"T_8f6e5_row6_col4\" class=\"data row6 col4\" >54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "      <td id=\"T_8f6e5_row7_col0\" class=\"data row7 col0\" >8</td>\n",
       "      <td id=\"T_8f6e5_row7_col1\" class=\"data row7 col1\" >Student_008</td>\n",
       "      <td id=\"T_8f6e5_row7_col2\" class=\"data row7 col2\" >20</td>\n",
       "      <td id=\"T_8f6e5_row7_col3\" class=\"data row7 col3\" >98</td>\n",
       "      <td id=\"T_8f6e5_row7_col4\" class=\"data row7 col4\" >52</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "      <td id=\"T_8f6e5_row8_col0\" class=\"data row8 col0\" >9</td>\n",
       "      <td id=\"T_8f6e5_row8_col1\" class=\"data row8 col1\" >Student_009</td>\n",
       "      <td id=\"T_8f6e5_row8_col2\" class=\"data row8 col2\" >74</td>\n",
       "      <td id=\"T_8f6e5_row8_col3\" class=\"data row8 col3\" >85</td>\n",
       "      <td id=\"T_8f6e5_row8_col4\" class=\"data row8 col4\" >63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "      <td id=\"T_8f6e5_row9_col0\" class=\"data row9 col0\" >10</td>\n",
       "      <td id=\"T_8f6e5_row9_col1\" class=\"data row9 col1\" >Student_010</td>\n",
       "      <td id=\"T_8f6e5_row9_col2\" class=\"data row9 col2\" >28</td>\n",
       "      <td id=\"T_8f6e5_row9_col3\" class=\"data row9 col3\" >98</td>\n",
       "      <td id=\"T_8f6e5_row9_col4\" class=\"data row9 col4\" >99</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row10\" class=\"row_heading level0 row10\" >10</th>\n",
       "      <td id=\"T_8f6e5_row10_col0\" class=\"data row10 col0\" >11</td>\n",
       "      <td id=\"T_8f6e5_row10_col1\" class=\"data row10 col1\" >Student_011</td>\n",
       "      <td id=\"T_8f6e5_row10_col2\" class=\"data row10 col2\" >35</td>\n",
       "      <td id=\"T_8f6e5_row10_col3\" class=\"data row10 col3\" >83</td>\n",
       "      <td id=\"T_8f6e5_row10_col4\" class=\"data row10 col4\" >85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row11\" class=\"row_heading level0 row11\" >11</th>\n",
       "      <td id=\"T_8f6e5_row11_col0\" class=\"data row11 col0\" >12</td>\n",
       "      <td id=\"T_8f6e5_row11_col1\" class=\"data row11 col1\" >Student_012</td>\n",
       "      <td id=\"T_8f6e5_row11_col2\" class=\"data row11 col2\" >23</td>\n",
       "      <td id=\"T_8f6e5_row11_col3\" class=\"data row11 col3\" >48</td>\n",
       "      <td id=\"T_8f6e5_row11_col4\" class=\"data row11 col4\" >67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row12\" class=\"row_heading level0 row12\" >12</th>\n",
       "      <td id=\"T_8f6e5_row12_col0\" class=\"data row12 col0\" >13</td>\n",
       "      <td id=\"T_8f6e5_row12_col1\" class=\"data row12 col1\" >Student_013</td>\n",
       "      <td id=\"T_8f6e5_row12_col2\" class=\"data row12 col2\" >45</td>\n",
       "      <td id=\"T_8f6e5_row12_col3\" class=\"data row12 col3\" >62</td>\n",
       "      <td id=\"T_8f6e5_row12_col4\" class=\"data row12 col4\" >90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row13\" class=\"row_heading level0 row13\" >13</th>\n",
       "      <td id=\"T_8f6e5_row13_col0\" class=\"data row13 col0\" >14</td>\n",
       "      <td id=\"T_8f6e5_row13_col1\" class=\"data row13 col1\" >Student_014</td>\n",
       "      <td id=\"T_8f6e5_row13_col2\" class=\"data row13 col2\" >63</td>\n",
       "      <td id=\"T_8f6e5_row13_col3\" class=\"data row13 col3\" >26</td>\n",
       "      <td id=\"T_8f6e5_row13_col4\" class=\"data row13 col4\" >56</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row14\" class=\"row_heading level0 row14\" >14</th>\n",
       "      <td id=\"T_8f6e5_row14_col0\" class=\"data row14 col0\" >15</td>\n",
       "      <td id=\"T_8f6e5_row14_col1\" class=\"data row14 col1\" >Student_015</td>\n",
       "      <td id=\"T_8f6e5_row14_col2\" class=\"data row14 col2\" >50</td>\n",
       "      <td id=\"T_8f6e5_row14_col3\" class=\"data row14 col3\" >64</td>\n",
       "      <td id=\"T_8f6e5_row14_col4\" class=\"data row14 col4\" >70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row15\" class=\"row_heading level0 row15\" >15</th>\n",
       "      <td id=\"T_8f6e5_row15_col0\" class=\"data row15 col0\" >16</td>\n",
       "      <td id=\"T_8f6e5_row15_col1\" class=\"data row15 col1\" >Student_016</td>\n",
       "      <td id=\"T_8f6e5_row15_col2\" class=\"data row15 col2\" >69</td>\n",
       "      <td id=\"T_8f6e5_row15_col3\" class=\"data row15 col3\" >31</td>\n",
       "      <td id=\"T_8f6e5_row15_col4\" class=\"data row15 col4\" >96</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row16\" class=\"row_heading level0 row16\" >16</th>\n",
       "      <td id=\"T_8f6e5_row16_col0\" class=\"data row16 col0\" >17</td>\n",
       "      <td id=\"T_8f6e5_row16_col1\" class=\"data row16 col1\" >Student_017</td>\n",
       "      <td id=\"T_8f6e5_row16_col2\" class=\"data row16 col2\" >98</td>\n",
       "      <td id=\"T_8f6e5_row16_col3\" class=\"data row16 col3\" >78</td>\n",
       "      <td id=\"T_8f6e5_row16_col4\" class=\"data row16 col4\" >55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row17\" class=\"row_heading level0 row17\" >17</th>\n",
       "      <td id=\"T_8f6e5_row17_col0\" class=\"data row17 col0\" >18</td>\n",
       "      <td id=\"T_8f6e5_row17_col1\" class=\"data row17 col1\" >Student_018</td>\n",
       "      <td id=\"T_8f6e5_row17_col2\" class=\"data row17 col2\" >65</td>\n",
       "      <td id=\"T_8f6e5_row17_col3\" class=\"data row17 col3\" >74</td>\n",
       "      <td id=\"T_8f6e5_row17_col4\" class=\"data row17 col4\" >95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row18\" class=\"row_heading level0 row18\" >18</th>\n",
       "      <td id=\"T_8f6e5_row18_col0\" class=\"data row18 col0\" >19</td>\n",
       "      <td id=\"T_8f6e5_row18_col1\" class=\"data row18 col1\" >Student_019</td>\n",
       "      <td id=\"T_8f6e5_row18_col2\" class=\"data row18 col2\" >95</td>\n",
       "      <td id=\"T_8f6e5_row18_col3\" class=\"data row18 col3\" >51</td>\n",
       "      <td id=\"T_8f6e5_row18_col4\" class=\"data row18 col4\" >61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_8f6e5_level0_row19\" class=\"row_heading level0 row19\" >19</th>\n",
       "      <td id=\"T_8f6e5_row19_col0\" class=\"data row19 col0\" >20</td>\n",
       "      <td id=\"T_8f6e5_row19_col1\" class=\"data row19 col1\" >Student_020</td>\n",
       "      <td id=\"T_8f6e5_row19_col2\" class=\"data row19 col2\" >83</td>\n",
       "      <td id=\"T_8f6e5_row19_col3\" class=\"data row19 col3\" >72</td>\n",
       "      <td id=\"T_8f6e5_row19_col4\" class=\"data row19 col4\" >82</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x22b97d9cbe0>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "#seaborn是python中的一个非常强大的数据可视化库\n",
    "import seaborn as sns\n",
    "#seaborn里面的调色板，我们可以用sns.color_palette()获取到这些颜色，然后用sns.palplot()将这些色块打印出来\n",
    "color_map = sns.light_palette('green', as_cmap=True)\n",
    "\n",
    "students = pd.read_excel('D:/VSCode/py/office/doc/Students_color.xlsx')\n",
    "'''\n",
    "    format对数据格式进行调整\n",
    "    cmap修改渐变的色度\n",
    "    background_gradient修改渐变的条件格式\n",
    "    apply对前几位的突出颜色\n",
    "    subset截取某一列做颜色突出\n",
    "'''\n",
    "\n",
    "students.style.background_gradient(cmap=color_map, subset=['Test_1','Test_2','Test_3'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style type=\"text/css\">\n",
       "#T_7860f_row0_col2 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 41.8%, transparent 41.8%);\n",
       "}\n",
       "#T_7860f_row0_col3, #T_7860f_row15_col3 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 31.3%, transparent 31.3%);\n",
       "}\n",
       "#T_7860f_row0_col4, #T_7860f_row6_col4 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 54.5%, transparent 54.5%);\n",
       "}\n",
       "#T_7860f_row1_col2, #T_7860f_row5_col2 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 87.8%, transparent 87.8%);\n",
       "}\n",
       "#T_7860f_row1_col3 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 22.2%, transparent 22.2%);\n",
       "}\n",
       "#T_7860f_row1_col4 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 59.6%, transparent 59.6%);\n",
       "}\n",
       "#T_7860f_row2_col2 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 55.1%, transparent 55.1%);\n",
       "}\n",
       "#T_7860f_row2_col3 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 25.3%, transparent 25.3%);\n",
       "}\n",
       "#T_7860f_row2_col4 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 68.7%, transparent 68.7%);\n",
       "}\n",
       "#T_7860f_row3_col2 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 83.7%, transparent 83.7%);\n",
       "}\n",
       "#T_7860f_row3_col3 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 36.4%, transparent 36.4%);\n",
       "}\n",
       "#T_7860f_row3_col4, #T_7860f_row6_col2 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 92.9%, transparent 92.9%);\n",
       "}\n",
       "#T_7860f_row4_col2 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 56.1%, transparent 56.1%);\n",
       "}\n",
       "#T_7860f_row4_col3, #T_7860f_row9_col4, #T_7860f_row16_col2 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 100.0%, transparent 100.0%);\n",
       "}\n",
       "#T_7860f_row4_col4 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 93.9%, transparent 93.9%);\n",
       "}\n",
       "#T_7860f_row5_col3 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 12.1%, transparent 12.1%);\n",
       "}\n",
       "#T_7860f_row5_col4 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 50.5%, transparent 50.5%);\n",
       "}\n",
       "#T_7860f_row6_col3 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 11.1%, transparent 11.1%);\n",
       "}\n",
       "#T_7860f_row7_col2 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 20.4%, transparent 20.4%);\n",
       "}\n",
       "#T_7860f_row7_col3, #T_7860f_row9_col3 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 99.0%, transparent 99.0%);\n",
       "}\n",
       "#T_7860f_row7_col4 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 52.5%, transparent 52.5%);\n",
       "}\n",
       "#T_7860f_row8_col2 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 75.5%, transparent 75.5%);\n",
       "}\n",
       "#T_7860f_row8_col3, #T_7860f_row10_col4 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 85.9%, transparent 85.9%);\n",
       "}\n",
       "#T_7860f_row8_col4 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 63.6%, transparent 63.6%);\n",
       "}\n",
       "#T_7860f_row9_col2 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 28.6%, transparent 28.6%);\n",
       "}\n",
       "#T_7860f_row10_col2 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 35.7%, transparent 35.7%);\n",
       "}\n",
       "#T_7860f_row10_col3 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 83.8%, transparent 83.8%);\n",
       "}\n",
       "#T_7860f_row11_col2 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 23.5%, transparent 23.5%);\n",
       "}\n",
       "#T_7860f_row11_col3 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 48.5%, transparent 48.5%);\n",
       "}\n",
       "#T_7860f_row11_col4 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 67.7%, transparent 67.7%);\n",
       "}\n",
       "#T_7860f_row12_col2 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 45.9%, transparent 45.9%);\n",
       "}\n",
       "#T_7860f_row12_col3 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 62.6%, transparent 62.6%);\n",
       "}\n",
       "#T_7860f_row12_col4 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 90.9%, transparent 90.9%);\n",
       "}\n",
       "#T_7860f_row13_col2 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 64.3%, transparent 64.3%);\n",
       "}\n",
       "#T_7860f_row13_col3 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 26.3%, transparent 26.3%);\n",
       "}\n",
       "#T_7860f_row13_col4 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 56.6%, transparent 56.6%);\n",
       "}\n",
       "#T_7860f_row14_col2 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 51.0%, transparent 51.0%);\n",
       "}\n",
       "#T_7860f_row14_col3 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 64.6%, transparent 64.6%);\n",
       "}\n",
       "#T_7860f_row14_col4 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 70.7%, transparent 70.7%);\n",
       "}\n",
       "#T_7860f_row15_col2 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 70.4%, transparent 70.4%);\n",
       "}\n",
       "#T_7860f_row15_col4 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 97.0%, transparent 97.0%);\n",
       "}\n",
       "#T_7860f_row16_col3 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 78.8%, transparent 78.8%);\n",
       "}\n",
       "#T_7860f_row16_col4 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 55.6%, transparent 55.6%);\n",
       "}\n",
       "#T_7860f_row17_col2 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 66.3%, transparent 66.3%);\n",
       "}\n",
       "#T_7860f_row17_col3 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 74.7%, transparent 74.7%);\n",
       "}\n",
       "#T_7860f_row17_col4 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 96.0%, transparent 96.0%);\n",
       "}\n",
       "#T_7860f_row18_col2 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 96.9%, transparent 96.9%);\n",
       "}\n",
       "#T_7860f_row18_col3 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 51.5%, transparent 51.5%);\n",
       "}\n",
       "#T_7860f_row18_col4 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 61.6%, transparent 61.6%);\n",
       "}\n",
       "#T_7860f_row19_col2 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 84.7%, transparent 84.7%);\n",
       "}\n",
       "#T_7860f_row19_col3 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 72.7%, transparent 72.7%);\n",
       "}\n",
       "#T_7860f_row19_col4 {\n",
       "  width: 10em;\n",
       "  background: linear-gradient(90deg, grey 82.8%, transparent 82.8%);\n",
       "}\n",
       "</style>\n",
       "<table id=\"T_7860f\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th class=\"blank level0\" >&nbsp;</th>\n",
       "      <th id=\"T_7860f_level0_col0\" class=\"col_heading level0 col0\" >ID</th>\n",
       "      <th id=\"T_7860f_level0_col1\" class=\"col_heading level0 col1\" >Name</th>\n",
       "      <th id=\"T_7860f_level0_col2\" class=\"col_heading level0 col2\" >Test_1</th>\n",
       "      <th id=\"T_7860f_level0_col3\" class=\"col_heading level0 col3\" >Test_2</th>\n",
       "      <th id=\"T_7860f_level0_col4\" class=\"col_heading level0 col4\" >Test_3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "      <td id=\"T_7860f_row0_col0\" class=\"data row0 col0\" >1</td>\n",
       "      <td id=\"T_7860f_row0_col1\" class=\"data row0 col1\" >Student_001</td>\n",
       "      <td id=\"T_7860f_row0_col2\" class=\"data row0 col2\" >41</td>\n",
       "      <td id=\"T_7860f_row0_col3\" class=\"data row0 col3\" >31</td>\n",
       "      <td id=\"T_7860f_row0_col4\" class=\"data row0 col4\" >54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "      <td id=\"T_7860f_row1_col0\" class=\"data row1 col0\" >2</td>\n",
       "      <td id=\"T_7860f_row1_col1\" class=\"data row1 col1\" >Student_002</td>\n",
       "      <td id=\"T_7860f_row1_col2\" class=\"data row1 col2\" >86</td>\n",
       "      <td id=\"T_7860f_row1_col3\" class=\"data row1 col3\" >22</td>\n",
       "      <td id=\"T_7860f_row1_col4\" class=\"data row1 col4\" >59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "      <td id=\"T_7860f_row2_col0\" class=\"data row2 col0\" >3</td>\n",
       "      <td id=\"T_7860f_row2_col1\" class=\"data row2 col1\" >Student_003</td>\n",
       "      <td id=\"T_7860f_row2_col2\" class=\"data row2 col2\" >54</td>\n",
       "      <td id=\"T_7860f_row2_col3\" class=\"data row2 col3\" >25</td>\n",
       "      <td id=\"T_7860f_row2_col4\" class=\"data row2 col4\" >68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "      <td id=\"T_7860f_row3_col0\" class=\"data row3 col0\" >4</td>\n",
       "      <td id=\"T_7860f_row3_col1\" class=\"data row3 col1\" >Student_004</td>\n",
       "      <td id=\"T_7860f_row3_col2\" class=\"data row3 col2\" >82</td>\n",
       "      <td id=\"T_7860f_row3_col3\" class=\"data row3 col3\" >36</td>\n",
       "      <td id=\"T_7860f_row3_col4\" class=\"data row3 col4\" >92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "      <td id=\"T_7860f_row4_col0\" class=\"data row4 col0\" >5</td>\n",
       "      <td id=\"T_7860f_row4_col1\" class=\"data row4 col1\" >Student_005</td>\n",
       "      <td id=\"T_7860f_row4_col2\" class=\"data row4 col2\" >55</td>\n",
       "      <td id=\"T_7860f_row4_col3\" class=\"data row4 col3\" >99</td>\n",
       "      <td id=\"T_7860f_row4_col4\" class=\"data row4 col4\" >93</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "      <td id=\"T_7860f_row5_col0\" class=\"data row5 col0\" >6</td>\n",
       "      <td id=\"T_7860f_row5_col1\" class=\"data row5 col1\" >Student_006</td>\n",
       "      <td id=\"T_7860f_row5_col2\" class=\"data row5 col2\" >86</td>\n",
       "      <td id=\"T_7860f_row5_col3\" class=\"data row5 col3\" >12</td>\n",
       "      <td id=\"T_7860f_row5_col4\" class=\"data row5 col4\" >50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "      <td id=\"T_7860f_row6_col0\" class=\"data row6 col0\" >7</td>\n",
       "      <td id=\"T_7860f_row6_col1\" class=\"data row6 col1\" >Student_007</td>\n",
       "      <td id=\"T_7860f_row6_col2\" class=\"data row6 col2\" >91</td>\n",
       "      <td id=\"T_7860f_row6_col3\" class=\"data row6 col3\" >11</td>\n",
       "      <td id=\"T_7860f_row6_col4\" class=\"data row6 col4\" >54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "      <td id=\"T_7860f_row7_col0\" class=\"data row7 col0\" >8</td>\n",
       "      <td id=\"T_7860f_row7_col1\" class=\"data row7 col1\" >Student_008</td>\n",
       "      <td id=\"T_7860f_row7_col2\" class=\"data row7 col2\" >20</td>\n",
       "      <td id=\"T_7860f_row7_col3\" class=\"data row7 col3\" >98</td>\n",
       "      <td id=\"T_7860f_row7_col4\" class=\"data row7 col4\" >52</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "      <td id=\"T_7860f_row8_col0\" class=\"data row8 col0\" >9</td>\n",
       "      <td id=\"T_7860f_row8_col1\" class=\"data row8 col1\" >Student_009</td>\n",
       "      <td id=\"T_7860f_row8_col2\" class=\"data row8 col2\" >74</td>\n",
       "      <td id=\"T_7860f_row8_col3\" class=\"data row8 col3\" >85</td>\n",
       "      <td id=\"T_7860f_row8_col4\" class=\"data row8 col4\" >63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "      <td id=\"T_7860f_row9_col0\" class=\"data row9 col0\" >10</td>\n",
       "      <td id=\"T_7860f_row9_col1\" class=\"data row9 col1\" >Student_010</td>\n",
       "      <td id=\"T_7860f_row9_col2\" class=\"data row9 col2\" >28</td>\n",
       "      <td id=\"T_7860f_row9_col3\" class=\"data row9 col3\" >98</td>\n",
       "      <td id=\"T_7860f_row9_col4\" class=\"data row9 col4\" >99</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row10\" class=\"row_heading level0 row10\" >10</th>\n",
       "      <td id=\"T_7860f_row10_col0\" class=\"data row10 col0\" >11</td>\n",
       "      <td id=\"T_7860f_row10_col1\" class=\"data row10 col1\" >Student_011</td>\n",
       "      <td id=\"T_7860f_row10_col2\" class=\"data row10 col2\" >35</td>\n",
       "      <td id=\"T_7860f_row10_col3\" class=\"data row10 col3\" >83</td>\n",
       "      <td id=\"T_7860f_row10_col4\" class=\"data row10 col4\" >85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row11\" class=\"row_heading level0 row11\" >11</th>\n",
       "      <td id=\"T_7860f_row11_col0\" class=\"data row11 col0\" >12</td>\n",
       "      <td id=\"T_7860f_row11_col1\" class=\"data row11 col1\" >Student_012</td>\n",
       "      <td id=\"T_7860f_row11_col2\" class=\"data row11 col2\" >23</td>\n",
       "      <td id=\"T_7860f_row11_col3\" class=\"data row11 col3\" >48</td>\n",
       "      <td id=\"T_7860f_row11_col4\" class=\"data row11 col4\" >67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row12\" class=\"row_heading level0 row12\" >12</th>\n",
       "      <td id=\"T_7860f_row12_col0\" class=\"data row12 col0\" >13</td>\n",
       "      <td id=\"T_7860f_row12_col1\" class=\"data row12 col1\" >Student_013</td>\n",
       "      <td id=\"T_7860f_row12_col2\" class=\"data row12 col2\" >45</td>\n",
       "      <td id=\"T_7860f_row12_col3\" class=\"data row12 col3\" >62</td>\n",
       "      <td id=\"T_7860f_row12_col4\" class=\"data row12 col4\" >90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row13\" class=\"row_heading level0 row13\" >13</th>\n",
       "      <td id=\"T_7860f_row13_col0\" class=\"data row13 col0\" >14</td>\n",
       "      <td id=\"T_7860f_row13_col1\" class=\"data row13 col1\" >Student_014</td>\n",
       "      <td id=\"T_7860f_row13_col2\" class=\"data row13 col2\" >63</td>\n",
       "      <td id=\"T_7860f_row13_col3\" class=\"data row13 col3\" >26</td>\n",
       "      <td id=\"T_7860f_row13_col4\" class=\"data row13 col4\" >56</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row14\" class=\"row_heading level0 row14\" >14</th>\n",
       "      <td id=\"T_7860f_row14_col0\" class=\"data row14 col0\" >15</td>\n",
       "      <td id=\"T_7860f_row14_col1\" class=\"data row14 col1\" >Student_015</td>\n",
       "      <td id=\"T_7860f_row14_col2\" class=\"data row14 col2\" >50</td>\n",
       "      <td id=\"T_7860f_row14_col3\" class=\"data row14 col3\" >64</td>\n",
       "      <td id=\"T_7860f_row14_col4\" class=\"data row14 col4\" >70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row15\" class=\"row_heading level0 row15\" >15</th>\n",
       "      <td id=\"T_7860f_row15_col0\" class=\"data row15 col0\" >16</td>\n",
       "      <td id=\"T_7860f_row15_col1\" class=\"data row15 col1\" >Student_016</td>\n",
       "      <td id=\"T_7860f_row15_col2\" class=\"data row15 col2\" >69</td>\n",
       "      <td id=\"T_7860f_row15_col3\" class=\"data row15 col3\" >31</td>\n",
       "      <td id=\"T_7860f_row15_col4\" class=\"data row15 col4\" >96</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row16\" class=\"row_heading level0 row16\" >16</th>\n",
       "      <td id=\"T_7860f_row16_col0\" class=\"data row16 col0\" >17</td>\n",
       "      <td id=\"T_7860f_row16_col1\" class=\"data row16 col1\" >Student_017</td>\n",
       "      <td id=\"T_7860f_row16_col2\" class=\"data row16 col2\" >98</td>\n",
       "      <td id=\"T_7860f_row16_col3\" class=\"data row16 col3\" >78</td>\n",
       "      <td id=\"T_7860f_row16_col4\" class=\"data row16 col4\" >55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row17\" class=\"row_heading level0 row17\" >17</th>\n",
       "      <td id=\"T_7860f_row17_col0\" class=\"data row17 col0\" >18</td>\n",
       "      <td id=\"T_7860f_row17_col1\" class=\"data row17 col1\" >Student_018</td>\n",
       "      <td id=\"T_7860f_row17_col2\" class=\"data row17 col2\" >65</td>\n",
       "      <td id=\"T_7860f_row17_col3\" class=\"data row17 col3\" >74</td>\n",
       "      <td id=\"T_7860f_row17_col4\" class=\"data row17 col4\" >95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row18\" class=\"row_heading level0 row18\" >18</th>\n",
       "      <td id=\"T_7860f_row18_col0\" class=\"data row18 col0\" >19</td>\n",
       "      <td id=\"T_7860f_row18_col1\" class=\"data row18 col1\" >Student_019</td>\n",
       "      <td id=\"T_7860f_row18_col2\" class=\"data row18 col2\" >95</td>\n",
       "      <td id=\"T_7860f_row18_col3\" class=\"data row18 col3\" >51</td>\n",
       "      <td id=\"T_7860f_row18_col4\" class=\"data row18 col4\" >61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th id=\"T_7860f_level0_row19\" class=\"row_heading level0 row19\" >19</th>\n",
       "      <td id=\"T_7860f_row19_col0\" class=\"data row19 col0\" >20</td>\n",
       "      <td id=\"T_7860f_row19_col1\" class=\"data row19 col1\" >Student_020</td>\n",
       "      <td id=\"T_7860f_row19_col2\" class=\"data row19 col2\" >83</td>\n",
       "      <td id=\"T_7860f_row19_col3\" class=\"data row19 col3\" >72</td>\n",
       "      <td id=\"T_7860f_row19_col4\" class=\"data row19 col4\" >82</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x22bb834adc0>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "\n",
    "students = pd.read_excel('D:/VSCode/py/office/doc/Students_color.xlsx')\n",
    "students.style.bar(color='grey', subset=['Test_1','Test_2','Test_3'])"
   ]
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "2469a70536e4d2335a2ea8907942d0699c37342a371ac185bdb5b0aa6f073890"
  },
  "kernelspec": {
   "display_name": "Python 3.9.0 64-bit",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.0"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
